import React from 'react';
import { HashRouter as Router, Switch, Route, Redirect } from 'react-router-dom'
import { routeConfig } from './router';
function App() {
  return (
    <Router>
      <Switch>
        {
          routeConfig && routeConfig.map(item => {
            return (<Route path={item.path} key={item.path} component={item.component} exact={item.exact}>
            </Route>)
          }
          )
        }
        <Redirect to="/index" />
      </Switch>
    </Router>
  );
}

export default App;
